import request from '@/utils/request'

// 创建企业管理
export function createCompany(data) {
  return request({
    url: '/member/company/create',
    method: 'post',
    data: data
  })
}

// 更新企业管理
export function updateCompany(data) {
  return request({
    url: '/member/company/update',
    method: 'put',
    data: data
  })
}

// 删除企业管理
export function deleteCompany(id) {
  return request({
    url: '/member/company/delete?id=' + id,
    method: 'delete'
  })
}

// 获得企业管理
export function getCompany(id) {
  return request({
    url: '/member/company/get?id=' + id,
    method: 'get'
  })
}

// 获得企业管理分页
export function getCompanyPage(query) {
  return request({
    url: '/member/company/page',
    method: 'get',
    params: query
  })
}

// 导出企业管理 Excel
export function exportCompanyExcel(query) {
  return request({
    url: '/member/company/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
